<%@ page  contentType="text/html;charset=UTF-8" language="java"
	import = "
	java.util.ArrayList,
	ch.ffhs.stupidtaskmanager.businessLogik.Task,
	ch.ffhs.stupidtaskmanager.businessLogik.Benutzer,
	ch.ffhs.stupidtaskmanager.datenObjekte.TaskDO
	"
%>

<jsp:include page="header.jsp"/>

	<h1>Alle Tasks:</h1>
	<table border = "1">
		<tr>
			<td>ID</td>
			<td>Titel</td>
			<td>Beschreibung</td>
			<td>Startdatum</td>
			<td>Enddatum</td>
<%
	ArrayList<TaskDO> alleTasks = new Task().gibAlleTasks(request.getUserPrincipal().getName());
	for (TaskDO task : alleTasks){	
%>
	
		<tr>
			<td><%= task.gibID() %></td>
			<td><%= task.gibTitel() %></td>
			<td><%= task.gibBeschreibung() %></td>
			<td><%= task.gibStartdatum() %></td>
			<td><%= task.gibEnddatum() %></td>
		<tr>
	
<%
	}
%>
	</table>
	Make new Task:
	<form action="task_speichern.jsp" method="post" name="task" >
		Beschreibung:
		<input type = "text" name = "beschreibung" id="beschreibung" size = "30" value = ""><br><br>
		<input type="image" src="images/save_btn.png"  id="submit" name="Submit" value = "speichern">
	</form>		